http_proxy - not working with sudo [closed]

Posted by Amil on Ask Ubuntu See other posts from Ask Ubuntu or by Amil
Published on 2012-09-17T18:44:07Z Indexed on 2012/09/17 21:53 UTC
Read the original article Hit count: 373

Filed under:
|
|

I am working on RHEL6 behind a proxy at my workplace. In order to make wget and other applications work, I modified my /etc/environment and added definitions for http_proxy, https_proxy, and ftp_proxy. I logged out and back in.

As desired, wget works correctly.

However, commands like sudo wget and sudo yum do not work. Upon further investigation, I see the reason is because my http_proxy settings are not being shown when I type "sudo env". In fact PATH is also reset.

How can I get http_proxy to be set for sudo?

© Ask Ubuntu or respective owner

Related posts about sudo

Related posts about proxy